package com.sunyifeng.ch05;

public class PrototypePatternDemo {

    public static void main(String[] args) {
        // 创建缓存
        ShapeCache.loadCache();

        // 从缓存中取出对象
        Shape clonedShape = ShapeCache.getShape("1");
        System.out.println("Shape : " + clonedShape);

        Shape clonedShape2 = ShapeCache.getShape("2");
        System.out.println("Shape : " + clonedShape2);

        Shape clonedShape3 = ShapeCache.getShape("3");
        System.out.println("Shape : " + clonedShape3);
    }
}